//
//  FirstViewViewController.m
//  HYNavigation
//
//  Created by runlhy on 16/9/27.
//  Copyright © 2016年 Pengcent. All rights reserved.
//
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)

#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#import "FirstViewViewController.h"
#import "MBProgressHUD+JDragon.h"
#import "UserTableViewCell.h"
#import "UserLivingDetailViewController.h"

@interface FirstViewViewController ()<UITableViewDataSource, UITableViewDelegate>

@end

@implementation FirstViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    



}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UserTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UserTableViewCell"];
    if (cell == nil) {
        
        cell = [[UserTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"UserTableViewCell"];
    }
    
    return cell;
    
    
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
       return SCREEN_WIDTH;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    UserLivingDetailViewController * livingDVc = [self.storyboard instantiateViewControllerWithIdentifier:@"UserLivingDetailViewController"];
    
    [self presentViewController:livingDVc animated:YES completion:nil];
    
}



@end
